package com.example.business_oa.service;

import com.example.comment_oa.dubbo.ChaJiaBanBeiShuDubbo;
import com.example.comment_oa.pojos.OvertimeBonus;
import io.seata.spring.annotation.GlobalTransactional;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChaJiaBanBeiShuService {

    @DubboReference(version = "1.0.0")
    ChaJiaBanBeiShuDubbo chaJiaBanBeiShuDubbo;

    @GlobalTransactional(timeoutMills = 300000)
    public List<OvertimeBonus> chajiabanbeishu(int obId){
        List<OvertimeBonus> overtimeBonuses = chaJiaBanBeiShuDubbo.selectByObId(obId);
        return  overtimeBonuses;
    }
}
